package com.kanshu.basictest.ui.base;

import androidx.annotation.CallSuper;
import androidx.appcompat.app.ActionBar;

public abstract class BaseToolbarActivity extends BaseActivity {

    /**
     * 提供title的资源
     *
     * @return
     */
    protected abstract String provideBarTitle();

    @CallSuper
    protected void init() {
        super.init();
        ActionBar actionBar = getSupportActionBar();
        if (actionBar != null) {
            actionBar.setTitle(provideBarTitle());
        }

    }


}
